﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MTK_BieuThuc
{
    public abstract class BinaryExpr : Expression
    {
        protected Expression cachedDerive;
        protected Expression expr1;
        protected Expression expr2;
        protected StrategyString strategy;
        public abstract Expression createDerive();
        public override Expression derive()
        {
            if (cachedDerive == null)
                cachedDerive = createDerive();
            return cachedDerive;
        }
        public abstract String getOperator();
        
    }
}
